package J1_10;

import java.util.Scanner;

public class J110task2 {
    public static void main(String[] args) {
        int a[]=new int[5];
        int min=0,j=0;
        Scanner scanner =new Scanner(System.in);
        for (int i=0;i<a.length;i++){
            a[i]=scanner.nextInt();
        }
        min=a[0];
        for (int i=0;i<a.length;i++){
            if (min>a[i]){
                min=a[i];
                j=i;
            }
        }
        a[j]=a[0];
        a[0]=min;
        for (int i=0;i<a.length;i++){
            System.out.printf(a[i]+"\t");
        }
    }
}
